package com.gdc.cloud.service;


import com.gdc.cloud.entities.CommonResult;
import com.gdc.cloud.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Description: Feign 的业务接口
 *
 * - @FeignClient                       表示 Feign 接口, value值，表示 调用的业务实例
 *                                          fallback参数：引用 回调实现类
 *
 * @author: gdc
 * @date: 2022/5/29
 * @version 1.0
 */
@FeignClient(value = "nacos-payment-provider", fallback = PaymentFallbackService.class)
@Component
public interface PaymentService {

    @GetMapping(value = "/paymentSql/{id}")
    CommonResult<Payment> paymentSql(@PathVariable("id") Long id);
}
